package com.chenbei.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chenbei.common.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Schema(description = "字典项实体类")
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sys_dict_item")
public class SysDictItem extends BaseEntity {

    @Schema(description = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "字典关联主键")
    @TableField("dict_id")
    @NotBlank(message = "字典关联主键不能为空")
    private Long dictId;

    @Schema(description = "字典项名称")
    @NotBlank(message = "字典项名称不能为空")
    private String label;

    @Schema(description = "字典项值")
    @TableField("label_value")
    @NotBlank(message = "字典项值不能为空")
    private String labelValue;

    @Schema(description = "状态[1:启用|2:禁用]")
    private Integer status;

    @Schema(description = "排序")
    private Integer sort;
}
